Try fixing index OOB issues in Editable.checkSuggestionNeeded#6303
Merged
jmartinesp merged 1 commit intodevelopfrom Mar 10, 2026
Merged
Conversation
- Fix the case where the order for `start` and `end` is reversed. - Fix the case where `start` or `end` may be outside the editable's range (`0..length`).
Contributor
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6303 +/- ##
===========================================
- Coverage 81.35% 81.35% -0.01%
===========================================
Files 2575 2575
Lines 70033 70043 +10
Branches 8989 8991 +2
===========================================
+ Hits 56975 56980 +5
- Misses 9706 9710 +4
- Partials 3352 3353 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ganfra
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Content
startandendis reversed.startorendmay be outside the editable's range (0..length).Added error logs for some of these issues.
Motivation and context
Try fixing https://github.com/element-hq/element-x-android-rageshakes/issues/10153
Tests
The bug report mentions changing the selection caused this issue for them, but I wasn't able to reproduce it. These are the only cases that came to mind that could cause the issue, given the boundaries are checked several times inside that function.
I tested the suggestions still worked after these changes though.
Tested devices
Checklist